package com.threeox.commonlibrary.impl;

import android.content.Context;
import android.view.View;

import com.threeox.commonlibrary.CommonApplcation;
import com.threeox.commonlibrary.callback.CallBackMsg;
import com.threeox.commonlibrary.callback.CommonCallback;
import com.threeox.commonlibrary.entity.engine.request.base.BaseRequestMsg;
import com.threeox.commonlibrary.entity.engine.request.network.NetWorkRequestMsg;
import com.threeox.commonlibrary.inter.IOverallConfig;
import com.threeox.commonlibrary.ui.view.inter.reload.IReloadView;
import com.threeox.commonlibrary.ui.view.inter.table.ITablePagingView;
import com.threeox.commonlibrary.ui.view.inter.table.ITableView;
import com.threeox.commonlibrary.ui.view.inter.titlebar.ITitleBarView;
import com.threeox.commonlibrary.ui.view.loadview.ILoadDialog;
import com.threeox.commonlibrary.util.request.RequestHelper;
import com.threeox.httplibrary.builder.OkHttpRequestBuilder;

/**
 *
 * @ClassName: AbstractOverallConfig
 *
 * @Description: TODO()
 *
 * @author 赵屈犇
 *
 * @date 创建时间: 2017/7/10 14:08
 *
 * @version 1.0
 *
 */
public abstract class AbstractOverallConfig implements IOverallConfig {

    protected CommonApplcation applcation;

    public AbstractOverallConfig() {
        this.applcation = CommonApplcation.getInstance();
    }

    @Override
    public ITitleBarView initTitleBarView(Context context) {
        return null;
    }

    @Override
    public IReloadView initStatusView(Context context) {
        return null;
    }

    @Override
    public ILoadDialog initLoadDialog(Context context) {
        return null;
    }

    @Override
    public ITableView initTableView(Context context) {
        return null;
    }

    @Override
    public ITablePagingView initTablePagingView(Context context) {
        return null;
    }

    @Override
    public Object getViewVal(View view) {
        return null;
    }

    @Override
    public void setViewValue(View view, Object value) {

    }

    @Override
    public void execRequest(RequestHelper requestHelper, BaseRequestMsg requestMsg, String requestType) throws Exception {
    }

    @Override
    public void onBeforeRequest(NetWorkRequestMsg requestMsg, OkHttpRequestBuilder requestBuilder) {
    }

    @Override
    public boolean onInterceptRequestSuccess(String message, int id, String url, CommonCallback callback) {
        return false;
    }

    @Override
    public Object onBeforeResponse(String url, int id, String message) {
        return null;
    }

    @Override
    public Object onAfterResponse(String url, int id, String message, Object data, Object result) {
        return null;
    }

    @Override
    public CallBackMsg onBeforeRequestError(CallBackMsg backMsg) {
        return null;
    }

    /*=====================全局响应请求结果操作=====================*/
    @Override
    public void onSuccess(String url, int id, String msg, Object data) {

    }

    @Override
    public void onError(String url, int id, Object code, String msg, Object data) {

    }

    @Override
    public void inProgress(float progress, long total, int id, String url) {

    }
    /*=====================全局响应请求结果操作=====================*/

    @Override
    public void onAfterSuccess(String url, int id, String msg, Object data) {

    }

    @Override
    public void onAfterError(String url, int id, Object code, String msg) {

    }

    @Override
    public void afterInProgress(float progress, long total, int id, String url) {

    }
}
